const systemInfo = uni.getSystemInfoSync()
const platform = process.env.UNI_PLATFORM;
// rpx 转为 px
export const rpx2px = (rpx: number) => {
	if (platform === 'h5') {
	  return uni.upx2px(rpx)
	} else if (platform === 'mp-weixin') {
	  return rpx * systemInfo.screenWidth / 750;
	} else if (platform === 'app') {
	  return uni.upx2px(rpx)
	}
}
// 顶部状态栏适配
export const statusBarHeight = () => {
	if (platform === 'h5') {
	  return 0
	} else if (platform === 'mp-weixin') {
	  return systemInfo.screenHeight - systemInfo.safeArea.height;
	} else if (platform === 'app') {
	  return 0
	} else {
		return 0
	}
}